package com.trs.publish.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class DictTypeExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DictTypeExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andDtIdIsNull() {
            addCriterion("dt_id is null");
            return (Criteria) this;
        }

        public Criteria andDtIdIsNotNull() {
            addCriterion("dt_id is not null");
            return (Criteria) this;
        }

        public Criteria andDtIdEqualTo(String value) {
            addCriterion("dt_id =", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdNotEqualTo(String value) {
            addCriterion("dt_id <>", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdGreaterThan(String value) {
            addCriterion("dt_id >", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdGreaterThanOrEqualTo(String value) {
            addCriterion("dt_id >=", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdLessThan(String value) {
            addCriterion("dt_id <", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdLessThanOrEqualTo(String value) {
            addCriterion("dt_id <=", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdLike(String value) {
            addCriterion("dt_id like", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdNotLike(String value) {
            addCriterion("dt_id not like", value, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdIn(List<String> values) {
            addCriterion("dt_id in", values, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdNotIn(List<String> values) {
            addCriterion("dt_id not in", values, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdBetween(String value1, String value2) {
            addCriterion("dt_id between", value1, value2, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtIdNotBetween(String value1, String value2) {
            addCriterion("dt_id not between", value1, value2, "dtId");
            return (Criteria) this;
        }

        public Criteria andDtNameIsNull() {
            addCriterion("dt_name is null");
            return (Criteria) this;
        }

        public Criteria andDtNameIsNotNull() {
            addCriterion("dt_name is not null");
            return (Criteria) this;
        }

        public Criteria andDtNameEqualTo(String value) {
            addCriterion("dt_name =", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameNotEqualTo(String value) {
            addCriterion("dt_name <>", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameGreaterThan(String value) {
            addCriterion("dt_name >", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameGreaterThanOrEqualTo(String value) {
            addCriterion("dt_name >=", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameLessThan(String value) {
            addCriterion("dt_name <", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameLessThanOrEqualTo(String value) {
            addCriterion("dt_name <=", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameLike(String value) {
            addCriterion("dt_name like", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameNotLike(String value) {
            addCriterion("dt_name not like", value, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameIn(List<String> values) {
            addCriterion("dt_name in", values, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameNotIn(List<String> values) {
            addCriterion("dt_name not in", values, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameBetween(String value1, String value2) {
            addCriterion("dt_name between", value1, value2, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtNameNotBetween(String value1, String value2) {
            addCriterion("dt_name not between", value1, value2, "dtName");
            return (Criteria) this;
        }

        public Criteria andDtContentIsNull() {
            addCriterion("dt_content is null");
            return (Criteria) this;
        }

        public Criteria andDtContentIsNotNull() {
            addCriterion("dt_content is not null");
            return (Criteria) this;
        }

        public Criteria andDtContentEqualTo(String value) {
            addCriterion("dt_content =", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentNotEqualTo(String value) {
            addCriterion("dt_content <>", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentGreaterThan(String value) {
            addCriterion("dt_content >", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentGreaterThanOrEqualTo(String value) {
            addCriterion("dt_content >=", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentLessThan(String value) {
            addCriterion("dt_content <", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentLessThanOrEqualTo(String value) {
            addCriterion("dt_content <=", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentLike(String value) {
            addCriterion("dt_content like", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentNotLike(String value) {
            addCriterion("dt_content not like", value, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentIn(List<String> values) {
            addCriterion("dt_content in", values, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentNotIn(List<String> values) {
            addCriterion("dt_content not in", values, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentBetween(String value1, String value2) {
            addCriterion("dt_content between", value1, value2, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtContentNotBetween(String value1, String value2) {
            addCriterion("dt_content not between", value1, value2, "dtContent");
            return (Criteria) this;
        }

        public Criteria andDtRankIsNull() {
            addCriterion("dt_rank is null");
            return (Criteria) this;
        }

        public Criteria andDtRankIsNotNull() {
            addCriterion("dt_rank is not null");
            return (Criteria) this;
        }

        public Criteria andDtRankEqualTo(Integer value) {
            addCriterion("dt_rank =", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankNotEqualTo(Integer value) {
            addCriterion("dt_rank <>", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankGreaterThan(Integer value) {
            addCriterion("dt_rank >", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankGreaterThanOrEqualTo(Integer value) {
            addCriterion("dt_rank >=", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankLessThan(Integer value) {
            addCriterion("dt_rank <", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankLessThanOrEqualTo(Integer value) {
            addCriterion("dt_rank <=", value, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankIn(List<Integer> values) {
            addCriterion("dt_rank in", values, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankNotIn(List<Integer> values) {
            addCriterion("dt_rank not in", values, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankBetween(Integer value1, Integer value2) {
            addCriterion("dt_rank between", value1, value2, "dtRank");
            return (Criteria) this;
        }

        public Criteria andDtRankNotBetween(Integer value1, Integer value2) {
            addCriterion("dt_rank not between", value1, value2, "dtRank");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNull() {
            addCriterion("create_time is null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIsNotNull() {
            addCriterion("create_time is not null");
            return (Criteria) this;
        }

        public Criteria andCreateTimeEqualTo(Date value) {
            addCriterionForJDBCDate("create_time =", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("create_time <>", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("create_time >", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("create_time >=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThan(Date value) {
            addCriterionForJDBCDate("create_time <", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("create_time <=", value, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeIn(List<Date> values) {
            addCriterionForJDBCDate("create_time in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("create_time not in", values, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("create_time between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("create_time not between", value1, value2, "createTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNull() {
            addCriterion("update_time is null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIsNotNull() {
            addCriterion("update_time is not null");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeEqualTo(Date value) {
            addCriterionForJDBCDate("update_time =", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("update_time <>", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("update_time >", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("update_time >=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThan(Date value) {
            addCriterionForJDBCDate("update_time <", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("update_time <=", value, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeIn(List<Date> values) {
            addCriterionForJDBCDate("update_time in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("update_time not in", values, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("update_time between", value1, value2, "updateTime");
            return (Criteria) this;
        }

        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("update_time not between", value1, value2, "updateTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}